package com.tw.learn.customJavaGenerator;

import org.jooq.codegen.DefaultGeneratorStrategy;
import org.jooq.meta.Definition;
import org.jooq.meta.TableDefinition;

public class GeneratorStrategy extends DefaultGeneratorStrategy {
	public String getJavaClassName(Definition definition, Mode mode) {
		String result = super.getJavaClassName(definition, mode);
		switch (mode) {
		case POJO:
			result += "Pojo";
			break;
		case DEFAULT:
			if (definition instanceof TableDefinition) {
				result = "T" + result;
			}
		default:
			break;
		}
		return result;

	}

}
